﻿using System;
using System.Collections.Generic;
using System.Text;
using GroupChat2013.Common;
using GroupChat2013.Interface;

namespace GroupChat2013.Main.Components
{
    public class GroupListReceiveProcess : IReceiveProcess
    {
        private FrmMain frmMain;

        /// <summary>
        /// 消息处理标志
        /// </summary>
        private string key;

        /// <summary>
        /// 构造函数
        /// </summary>
        public GroupListReceiveProcess(FrmMain frmMain)
        {
            this.frmMain = frmMain;
            key = ConstClass.GETMYGROUPLIST;
        }

        public bool Process(Entity.Protocol.TransferMsgInfo message)
        {
            if (!message.action.Equals(key))
                return false;

            frmMain.InitGroupList();

            return true;
        }
    }
}
